VMS Help  —  PASCAL  Data Types, Structured Types, ARRAY  Standard array constructor
  Array constructors are lists of  values  that  you  can  use  to
  specify an array value.

  Syntax:

     [[data-type]] [ [[{{{component | component-subrange}},... :
        component-value};... ]] [[OTHERWISE component-value [[;]] ]] ]

  The 'data-type' specifies the constructor's data type.   If  you
  use  the  constructor  in the executable section or in the CONST
  section, a data-type identifier is required.  Do not use a  type
  identifier   in   initial-state   specifiers  elsewhere  in  the
  declaration section or in nested constructors.

  The 'component' or a 'component-subrange' specifies  an  element
  number  to which the component-value applies.  You can specify a
  subrange of components.   Array  elements  do  not  have  to  be
  specified  in order.  The component must be a compile-time value
  or constant.

  The 'component-value' specifies the value to be assigned to  the
  array  elements  in the component-list; the value must be of the
  same data type as the array-component type.   This  value  is  a
  compile-time value; if you use the constructor in the executable
  section, you can also use a run-time value.

  'OTHERWISE' specifies a  value  to  be  assigned  to  all  array
  elements that have not already been assigned values.

  When using array constructors, you must initialize all  elements
  of the array; you cannot partially initialize the array.

  When you specify constructors for multidimensional arrays in the
  executable  section,  only  specify  the  type  of the outermost
  array.
Additional Information: explode extract
Examples
Close Help